//
//  MantisWebTableViewCell.m
//  NLProjectFrameworkDemo
//
//  Created by iosdeveloper on 2020/5/13.
//  Copyright © 2020 yj_zhang. All rights reserved.
//

#import "MantisWebTableViewCell.h"

@implementation MantisWebTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self setUpView];
    }
    return self;
}
-(void)setUpView{
    [super setUpView];
    [self.contentView addSubview:self.choseBtnView];
}

-(ChoiceBtnView *)choseBtnView{
    if (!_choseBtnView) {
        
        CGFloat width=  IMSCREEN_WIDTH-adaptWidth750(60*2)-adaptWidth750(20);
        _choseBtnView =[[ChoiceBtnView alloc]initWithFrame:CGRectMake(0,0,width ,0)];
      
    }
    return _choseBtnView;
}



-(void)reloadWebViewWith:(MantisWelcomeImgModel*)welModel{
    NSDictionary*contentDic=welModel.historyModel.msg.mj_keyValues;
    MantisTextCellContentData*content=[MantisTextCellContentData mj_objectWithKeyValues:contentDic];
    self.choseBtnView.hidden=welModel.isHidden;
    self.choseBtnView.frame=CGRectMake(welModel.wkWebView.jk_left,welModel.wkWebView.jk_bottom,welModel.wkWebView.jk_width ,btnHeight);
    [self.choseBtnView reloadChoceBtnViewWith:content.content];
    
    
}





- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
